<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>订单详情</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	
  </head>
  
  <body>
  <div>
  	订单号<br/>
  	${order.orderID }
  </div>
  <br/>
  <div>
  	订单状态: 
  	<c:choose>
		<c:when test="${order.orderStatus == 'WAIT_BUYER_PAY'}">
		待买家付款		
		</c:when>
		<c:when test="${order.orderStatus == 'WAIT_BUYER_PAY'}">
		待卖家发货
		</c:when>
		<c:when test="${order.orderStatus == 'WAIT_BUYER_PAY'}">
		卖家已发货
		</c:when>
		<c:when test="${order.orderStatus == 'WAIT_BUYER_PAY'}">
		交易成功
		</c:when>
  	</c:choose>
  	<br/>
  	<br/>
  </div>
  <div>
  	收货地址:<br/>
  	姓名：${receiver.name }<br/>
  	地址：${receiver.address }<br/>
  	邮编：${receiver.zip }<br/>
  	电话：${receiver.mobile }<br/>
  </div>
  <br/>
  <div>
  	商品
  	<table border=1>
  		<tr>
  			<td>商品名称</td>
  			<td>商品单价</td>
  			<td>商品数量</td>
  		</tr>
  		<c:forEach items="${order.details }" var="detail">
  		<tr>
  			<td>${detail.productID }</td>
  			<td>${detail.productPrice }</td>
  			<td>${detail.productNumber }</td>
  		</tr>
  		</c:forEach>
  		<tr>
  			<td>总额：${order.totalPrice }</td>
  		</tr>
  	</table>
  </div>
  </body>
</html>
